#ifndef CHILDTHREAD_H
#define CHILDTHREAD_H
#include "ctool.h"
#include <QObject>
#include <QRunnable>
#include <QTcpSocket>
#include <qsqldatabase.h>
#include <qthread.h>
class childThread:public QThread
{
    Q_OBJECT
public:
    childThread();
    childThread(QTcpSocket *clientTcpSocket, QObject *parent);

    void run() override;
    void setClientTcpSocket(QTcpSocket *newClientTcpSocket);

    const QSqlDatabase *getDb() const;
    void setDb(const QSqlDatabase *newDb);

private:
        QByteArray dedicatedDelimiter="/codeNestktbocodeNest/";
    QTcpSocket *clientTcpSocket;
    ctool* ctool;
    const QSqlDatabase *db;

};

#endif // CHILDTHREAD_H
